package month3.day30;

import java.util.Scanner;

public class ZuilinText {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        Zulingonsi z=new Zulingonsi("金路至尊租赁有限公司","99999999");
        while  (true){
            System.out.println(z.getName()+"欢迎您，请致电"+z.getDianhua()+"洽谈相关租赁业务\n本公司现有"+z.count+"车可租");
            System.out.println("1：查看车辆情况；2：租赁，3：还车，4：报废，5：采购新车，6：查看租赁记录，9：退出\n请选择");
            int number=in.nextInt();
            if(number==1){
                z.show();
                z.show(number);
            }else if(number==2){
                System.out.println("请选择车牌号");
                String num=in.next();
                System.out.println("请输入租赁天数");
                int day=in.nextInt();
                System.out.println("请输入租赁人姓名");
                String name=in.next();
                System.out.println(z.zujin(day,name,num));
            }else if(number==3){
                    z.yichuzu();
                    System.out.println("请输入归还车辆车牌");
                    String num = in.next();
                    z.huanche(num);
            }else if(number==4){
                System.out.println("请选择报废车牌号");
                String num=in.next();
                z.baofei(num);
            }else if(number==5){
                System.out.println("请选择购买新车类型，1：轿车，2(其他)：客车");
                int num=in.nextInt();
                System.out.println("请输入新车车牌");
                String chepai=in.next();
                if(z.panduan(chepai)){
                    System.out.println("请输入新车品牌");
                    String pingpai=in.next();
                    System.out.println("请输入新车日租金");
                    double money=in.nextInt();
                    if(num==1){
                        System.out.println("请输入新车型号");
                        String xinghao=in.next();
                        z.xinche(chepai,pingpai,money,xinghao);
                    }else{
                        System.out.println("请输入新车座位数");
                        int zuowei=in.nextInt();
                        z.xinche(chepai,pingpai,money,zuowei);
                    }
                }else {
                    System.out.println("车牌重复");
                }

            }else if(number==6){
                z.xinxi();
            }else if(number==7){

            }else if(number==8){

            }else if(number==9){
                return;
            }
//            z.xinche("88888","金龙",900,16);
//            z.xinche("88888","金龙",600,"16");

        }
    }
}
